<?php
	require_once('client_config.php');
	require_once('ntml_soapclient.php');
	$client = new MyNTMLSoapClient('./ews/services.wsdl', $soap_options);
	$client->set_profile($user_profile['login'], $user_profile['password']);
	$appointment = $client->get_appointment($_GET['Id'],&$errcode, &$error);
	if($errcode !== "NoError"){
		echo "Error: " . $errcode . "( " . $error ." )";
	}else{
		echo "<table border='1' align='center'>";
		echo "<CAPTION><font color='blue'><b>The detail of the appointment</b></font></CAPTION>";

		echo "<thead><tr>";
		echo "<th>Subject</th>";
		echo "<th>Location</th>";
		echo "<th>Description</th>";
		echo "<th>Categories</th>";
		echo "<th>Start date</th>";
		echo "<th>End date</th>";
		echo "</tr></thead>";
		echo "<tbody>";
		echo $appointment->display_as_row(NULL,array(1,1,1,1,1,1,0));
		echo "<tr><td colspan='8' align='center'><a href='find_appointments.php'>Back</a></td></tr>";
		echo "</tbody></table>";

	}

	exit;
?>